<table>
	<thead>
		<tr>
			<g:sortableColumn property="date" title="${message(code: 'action.data.label', default: 'Date')}" />
			<g:sortableColumn property="cost" title="${message(code: 'action.cost.label', default: 'Cost')}" />
			<g:sortableColumn property="next" title="${message(code: 'maintenance.next.label', default: 'Next')}" />
		</tr>
	</thead>
	<g:each in="${maintanceList}" var="m" status="i">
		<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
			<td><g:link controller="maintenance" action="show" id="${m.id}">
					<g:formatDate format="yyyy-MM-dd" date="${m.date}" />
				</g:link></td>
			<td>
				${m.cost}
			</td>
			<td>
				<g:formatDate format="yyyy-MM-dd" date="${m.predictedDate}" />
			</td>
		</tr>
	</g:each>
</table>
<util:remotePaginate controller="vehicle" action="paginateMaintenance" 
	total="${maintanceCount}" update="maintenanceList" max="20" params="${params}"/>
<nav>
	<ul>
		<li><g:link class="create" action="create" controller="Maintenance" params="${params}"><g:message code="maintenance.create.label" default="create" /></g:link></li>
	</ul>
</nav>